package com.dms.modules.user.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "IdentityDTO对象", description = "实名认证信息")
public class IdentityDTO {
    
    @NotBlank(message = "真实姓名不能为空")
    @ApiModelProperty("真实姓名")
    private String realName;
    
    @NotBlank(message = "身份证号不能为空")
    @Pattern(regexp = "^[1-9]\\d{5}(19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[0-9Xx]$", 
            message = "身份证号格式不正确")
    @ApiModelProperty("身份证号")
    private String idCard;
    
    @NotBlank(message = "身份证正面照片不能为空")
    @ApiModelProperty("身份证正面照片")
    private String idCardFront;
    
    @NotBlank(message = "身份证反面照片不能为空")
    @ApiModelProperty("身份证反面照片")
    private String idCardBack;
} 